package my.db.DTO;
import java.util.*;

public class ArticleDTO {
	private int articleNo;
	private Date articleDate;
	private String articleTitle,articleContent;
	private AuthorDTO author;
	private ArticleTypeDTO articleType;
	private int articleStatus;
	private String articleImage;
	public ArticleDTO() {
		super();
		author=new AuthorDTO();
		articleType=new ArticleTypeDTO();
	}
	public String getArticleImage() {
		return articleImage;
	}
	public void setArticleImage(String articleImage) {
		this.articleImage = articleImage;
	}
	/**
	 * @param articleNo
	 * @param articleTitle
	 * @param date
	 * @param articleContent
	 * @param author
	 * @param articleType
	 */
	public ArticleDTO(int articleNo, String articleTitle,
			java.util.Date date, String articleContent,int authorNo,
		int typeID) {
		this.articleNo = articleNo;
		this.articleTitle = articleTitle;
		this.articleDate = date;
		this.articleContent = articleContent;
		author.setAuthorID(authorNo);
		articleType.setTypeID(typeID);
	}

	/**
	 * @param articleNo
	 * @param articleTitle
	 * @param articleDate
	 * @param articleContent
	 */
	public ArticleDTO(int articleNo, String articleTitle,
			Date articleDate, String articleContent) {
		this.articleNo = articleNo;
		this.articleTitle = articleTitle;
		this.articleDate = articleDate;
		this.articleContent = articleContent;
	}
	
	/**
	 * @param articleNo
	 * @param articleDate
	 * @param articleTitle
	 * @param articleContent
	 * @param author
	 * @param articleType
	 * @param articleStatus
	 */
	public ArticleDTO(int articleNo, Date articleDate, String articleTitle,
			String articleContent, AuthorDTO author,
			ArticleTypeDTO articleType, int articleStatus) {
		this.articleNo = articleNo;
		this.articleDate = articleDate;
		this.articleTitle = articleTitle;
		this.articleContent = articleContent;
		this.author = author;
		this.articleType = articleType;
		this.articleStatus = articleStatus;
	}
	/**
	 * @return the articleStatus
	 */
	public int getArticleStatus() {
		return articleStatus;
	}
	/**
	 * @param articleStatus the articleStatus to set
	 */
	public void setArticleStatus(int articleStatus) {
		this.articleStatus = articleStatus;
	}
	/**
	 * @return the author
	 */
	public AuthorDTO getAuthor() {
		return author;
	}
	/**
	 * @param author the author to set
	 */
	public void setAuthor(AuthorDTO author) {
		this.author = author;
	}
	/**
	 * @return the articleType
	 */
	public ArticleTypeDTO getArticleType() {
		return articleType;
	}
	/**
	 * @param articleType the articleType to set
	 */
	public void setArticleType(ArticleTypeDTO articleType) {
		this.articleType = articleType;
	}
	/**
	 * @return the articleNo
	 */
	public int getArticleNo() {
		return articleNo;
	}

	/**
	 * @param articleNo the articleNo to set
	 */
	public void setArticleNo(int articleNo) {
		this.articleNo = articleNo;
	}

	/**
	 * @return the articleTitle
	 */
	public String getArticleTitle() {
		return articleTitle;
	}

	/**
	 * @param articleTitle the articleTitle to set
	 */
	public void setArticleTitle(String articleTitle) {
		this.articleTitle = articleTitle;
	}

	/**
	 * @return the articleDate
	 */
	public Date getArticleDate() {
		return articleDate;
	}

	/**
	 * @param articleDate the articleDate to set
	 */
	public void setArticleDate(Date articleDate) {
		this.articleDate = articleDate;
	}

	/**
	 * @return the articleContent
	 */
	public String getArticleContent() {
		return articleContent;
	}

	/**
	 * @param articleContent the articleContent to set
	 */
	public void setArticleContent(String articleContent) {
		this.articleContent = articleContent;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ArticleDTO [articleNo=" + articleNo + ", articleDate="
				+ articleDate + ", articleTitle=" + articleTitle
				+ ", articleContent=" + articleContent + ", author=" + author
				+ ", articleType=" + articleType + ", articleStatus="
				+ articleStatus + "]";
	}
}
